@echo off
set CurrentPath=%~dp0
set P1Path=
:begin
for /f "tokens=1,* delims=\" %%i in ("%CurrentPath%") do (set content=%%i&&set CurrentPath=%%j)
if "%P1Path%%content%\" == "%~dp0" goto end
set P1Path=%P1Path%%content%\
goto begin
:end
echo P1Path=%P1Path%
FOR /f "tokens=1 delims=: skip=1 eol=#" %%i IN (%P1Path%JM_config) DO (
echo %%i
ssh administrator@%%i "cd C:\Users\Administrator\jmeterEnv\Matset_jmx & rd /s/q report & del *.jtl,*.log"
ssh administrator@%%i "cd C:\Users\Administrator\jmeterEnv\jmeter\apache-jmeter-5.1.1\bin & del errorReport*.log"
)
pause


rem 删除Master控制机历史压测报告、 删除Slave压力机错误日志